/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.luyennv.btvn1;

import java.util.Scanner;

/**
 *
 * @author Nhim
 */
public class Bai5 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        System.out.println(Fibonacci(n));
    }
    public static long Fibonacci(int n){
        int a = 1, b = 1, c,dem =1;
        if( n == 0 || n == 1) return 1;
        while(true){
            c = a + b;
            dem++;
            if(dem == n) break;
            else{
                a = b;
                b = c;
            }
        }
        return c;
    }
}
